﻿<%@ Page Language="vb" AutoEventWireup="false" Codebehind="SaleModiApply_ChgPrice_Edit_BgAfter.aspx.vb" Inherits="Slxt.SaleModiApply_ChgPrice_Edit_BgAfter" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>定单管理</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="/_common/styles/global.css" type="text/css" rel="stylesheet">
		<LINK href="/_nav/menu.css" type="text/css" rel="stylesheet">
		<LINK href="/_forms/styles/form.css" type="text/css" rel="stylesheet">
		<LINK href="/_nav/tabs.css" type="text/css" rel="stylesheet">
		<LINK href="/_nav/nav.css" type="text/css" rel="stylesheet">
		<LINK href="/_common/styles/select.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_common/scripts/Details.js"></script>
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_forms/FormBase.js"></script>		
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/_controls/datetime/time.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookup.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookupDialogs.js"></script>
		<script language="javascript" src="/_controls/lookup/selectteamuser.js"></script>
		<script language="javascript" src="/slxt/js/Public.js"></script>
		<script language="javascript" src="/SLXT/XSXC/XSXC_Public.js"></script>
		<script language="javascript" src="/slxt/XSXC/SaleModiApply_ChgPrice_Edit_BgAfter_chg.js"></script>
		<script language="javascript" src="/slxt/XSXC/TestScript.js"></script>
		<script language="javascript">
		//在线帮助文件
		var _MyHelpfile = "/Slxt/help/topics/交易管理/定单管理/业务变更.html";
		function  window.onload()
		{
		    document.all.Section1.style.display="none";
		
		       if(__type.value=="合同")
		     {
		        appForm.RmbCjTotal.parentElement.previousSibling.innerText="合同总价(人民币)";
		        appForm.CjTotal.parentElement.previousSibling.innerText="合同总价";	
		        appForm.bz.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.previousSibling.innerText="合同币种";
		        appForm.ExRate.parentElement.previousSibling.innerText="合同汇率";						     
		     }
		     var objTd=window.frameElement.parentElement;
		     objTd.parentElement.nextSibling.style.display="none";
		     
		     //判断当前项目是否存在外币合现
	        if(Form1.txtForeignCurrency.value=="1")
	        {
		        appForm.ExRate.parentElement.style.display="";
		        appForm.ExRate.parentElement.previousSibling.style.display="";
		        appForm.RmbCjTotal.parentElement.parentElement.style.display="";
		        
		        objTd.height="230";
	        }
	        else
	        {
		         appForm.ExRate.parentElement.style.display="none";
		        appForm.ExRate.parentElement.previousSibling.style.display="none";
		        appForm.RmbCjTotal.parentElement.parentElement.style.display="none";
		        objTd.height="203";
	        } 
	        appForm.appForm_RoomStru.setValue(Form1.txtRoomStru.value);	
            if(__mode.value!="3")
            {
                // 根据企业应用模式设置价格只读				        
       	         InitCorpModel();
       	    }       	    
	       	
	       	document.all.areaForm.style.padding=0;
	     
	       	document.all.appForm_tab0.style.borderWidth="0";
	        document.all.appForm_tab0.style.margin="0";
	        document.all.appForm_tab0.style.padding="0";	       
	       	
	       	// 显示折扣警戒线信息
	       AlertDiscntLow();
	       //设置页面没有修改，避免关闭时的提示
	        appForm.setFormDefaultValue();	
		}
		
		function getUserXml()
		{
		    var xmlData ="<xml>";							

            xmlData += "<CalMode>" + appForm.CalMode.value+"</CalMode>";
            xmlData += "<PayformName>" + appForm.PayformName.value+"</PayformName>";
            xmlData += "<DiscntValue>" + (appForm.DiscntValue.value==""?"0":appForm.DiscntValue.value.replace(/,/ig,""))+"</DiscntValue>";
            xmlData += "<DiscntRemark>" + appForm.DiscntRemark.value+"</DiscntRemark>";
            xmlData += "<BldCjPrice>" + (appForm.BldCjPrice.value==""?"0":appForm.BldCjPrice.value.replace(/,/ig,""))+"</BldCjPrice>";
            xmlData += "<TnCjPrice>" + (appForm.TnCjPrice.value==""?"0":appForm.TnCjPrice.value.replace(/,/ig,""))+"</TnCjPrice>";
            xmlData += "<RoomTotal>" +(appForm.RoomTotal.value==""?"0":appForm.RoomTotal.value.replace(/,/ig,""))+"</RoomTotal>";
            xmlData += "<ZxBz>" + appForm.ZxBz.value+"</ZxBz>";
            xmlData += "<ZxPrice>" + (appForm.ZxPrice.value==""?"0":appForm.ZxPrice.value.replace(/,/ig,""))+"</ZxPrice>";
            xmlData += "<ZxTotal>" + (appForm.ZxTotal.value==""?"0":appForm.ZxTotal.value.replace(/,/ig,""))+"</ZxTotal>";
            xmlData += "<IsZxkbrht>" + appForm.IsZxkbrht.value +"</IsZxkbrht>";
            xmlData += "<FsTotal>" + (appForm.FsTotal.value==""?"0":appForm.FsTotal.value.replace(/,/ig,""))+"</FsTotal>";
            xmlData += "<RmbCjTotal>" +(appForm.RmbCjTotal.value==""?"0":appForm.RmbCjTotal.value.replace(/,/ig,""))+"</RmbCjTotal>";
            xmlData += "<Bz>" + appForm.bz.value+"</Bz>";
            xmlData += "<ExRate>" + (appForm.ExRate.value==""?"0":appForm.ExRate.value.replace(/,/ig,""))+"</ExRate>";
            xmlData += "<CjTotal>" + (appForm.CjTotal.value == "" ? "0" : appForm.CjTotal.value.replace(/,/ig, "")) + "</CjTotal>";

            xmlData += "<DjBldCjPrice>" + (appForm.DjBldCjPrice.value == "" ? "0" : appForm.DjBldCjPrice.value.replace(/,/ig, "")) + "</DjBldCjPrice>";
            xmlData += "<DjTnCjPrice>" + (appForm.DjTnCjPrice.value == "" ? "0" : appForm.DjTnCjPrice.value.replace(/,/ig, "")) + "</DjTnCjPrice>";
            xmlData += "<DjRoomTotal>" + (appForm.DjRoomTotal.value == "" ? "0" : appForm.DjRoomTotal.value.replace(/,/ig, "")) + "</DjRoomTotal>";
            
			xmlData +="</xml> "
			
			//设置页面没有修改，避免关闭时的提示
	        appForm.setFormDefaultValue();	
	    	return xmlData;
		
		}	
		
		function validReq(isSp) {
		    var strReturn=appForm.BuildXml(true,false);
		    if (strReturn == "2") {
		        return false;
		    }
		    else {
		        if (document.getElementById("txtIsjydjx").value == "1") {
		            if (parseFloat(appForm.RoomTotal.value.replace(/,/ig, "")) < parseFloat(appForm.DjRoomTotal.value.replace(/,/ig, ""))) {
		                if (isSp == "1") {
		                    alert("房间总价低于底价，不允许审批！")
		                    return false;
		                }
		                else {
		                    alert("房间总价低于底价，不允许保存！")
		                    return false;
		                }
		            }

		        }
		        else {
		            return true;
		        }

		        return true;
		    }
		}
		
		function appFormCheckUpdated()
		{ 
		 
		   return appForm.CheckUpdated();		
		}
		
		   //对象焦点失去前的校验，用于解决目前平台控件校验只能在onblur时造成的多控件争焦点的情况
	    function BeforeDeActivateForNum(obj)
	    {
	         //设置面积保留位
	        //史海峰	2005-01-07
	        if ( obj.acc == "mj" )
	        {
		        obj.acc = 4;
	        }
	        if ( isNaN(obj.acc) )			// 自定义小数位数
	        {
		        obj.acc = eval("FMT_" + obj.acc);
	        }
	        //
	        var sValue		= Trim(obj.value);
	        var iMinValue	= parseFloat(obj.min);
	        var iMaxValue	= parseFloat(obj.max);
	        var bGrouping	= (obj.grp == "true");			//是否带千分号
	       
	        var sFormat		= ORG_NUMBER_FORMAT;
	        var iAccuracy	= parseInt(obj.acc, 10);

	        var oEvent;

	        if (sValue.length == 0)
	        {
	           event.returnValue=true;
		       return true;
	        }

	        if (obj.dt == "integer")
	        {
	            sValue = FormatInteger(sValue, iMinValue, iMaxValue, bGrouping, sFormat);

		        if (sValue)
		        {
			        event.returnValue=true;
		            return true;
		        }
		        else
		        {
			        obj.select();
			        event.returnValue=false;
		            return false;
		        }
	        }
	        else
	        {
	            sValue = FormatFloat(sValue, iMinValue, iMaxValue, bGrouping, sFormat, iAccuracy);

		        if (sValue)
		        {
			        event.returnValue=true;
		            return true;
		        }
		        else
		        {
			        obj.select();
			        event.returnValue=false;
		            return false;
		        }
	        }

	        if (!obj.returnValue)
	        {
		        obj.select();
		        event.returnValue=false;
		        return false;
	        }
	        
	        event.returnValue=true;
		    return true;
	    }
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout" onclick="BodyClick()">
		<table class="layout" cellSpacing="0" cellPadding="0"  >
			<COLGROUP>
				<col width="140"> <!-- 导航菜单：140px -->
				<col>
			</COLGROUP>
			<tr>			
				<td id="tdAreas"  colSpan="2">
					<div class="area" id="areaForm"><cnt:appform id="appForm" runat="server" invokefunction="SaveOrder" invokeclass="Mysoft.Slxt.Business.Order"
							assembly="Mysoft.Slxt.Business" processtype="xmlhttp" onaftersave="oprAfterSave()" onbeforesave="oprBeforeSave()" debug="false"
							DefaultValueXml=""></cnt:appform></div>
				</td>
			</tr>			
		</table>
		<iframe style="WIDTH: 100%; HEIGHT: 0px; BACKGROUND-COLOR: #ffff66" name="refreshIframe"
			frameBorder="0" scrolling="no"></iframe>
		<form id="Form2" action="" method="post" target="">
			<input id="txtYwDataXml" style="DISPLAY: none" type="hidden" name="txtYwDataXml">
		</form>
		<form id="Form1" runat="server">
			<!-- 业务参数  --><asp:textbox id="txtCorpModel" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtIsShowHyBtn" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableSFA" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtBgShConfig" style="DISPLAY: none" Runat="server"></asp:textbox><!--变更审批业务参数设置值-->
			<asp:textbox id="txtEnableBgjgSh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableTfSh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableHfSh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableZjqyrSh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableQtbgSh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEnableProjTeamForSrcMng" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtForeignCurrency" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtCalStd" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEarnestStd" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtPriceZero" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtTotalZero" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtDiscntLow" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtAmountLow" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtEndDays" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtIsjydjx" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtQuDefineGUID" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtConcurrent" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtStatusChgGUID" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtOperHandler" style="DISPLAY: none" Runat="server"></asp:textbox>
			<!-- 从属表XML  --><asp:textbox id="txtDiscntListXml" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtFsfcListXml" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtFeeListXml" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtYwbgDataXml" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtSaleListXml" style="DISPLAY: none" Runat="server"></asp:textbox>
			<!-- 其它  --><asp:textbox id="txtFsTs" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtLxdh" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtRoomStru" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtEarnestRate" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtAjRate" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtGjjRate" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtAjIsDeductEarnest" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtGjjIsDeductEarnest" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtAjZero" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtGjjZero" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsAj" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsGjj" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtDjArea" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtEnableSaleChgApp" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtYwFlag" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsFeeCreated" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsAutoSaved" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsPayDataChanged" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsPayAllCheck" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtIsCalPrice" style="DISPLAY: none" Runat="server"></asp:textbox><asp:textbox id="txtTestHandYh" style="DISPLAY: none" Runat="server"></asp:textbox>
			<asp:textbox id="txtGetBindRoomguids" style="DISPLAY: none" Runat="server"></asp:textbox></form>
	</body>
</HTML>
